package com.guoxue.domain;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import org.hibernate.annotations.GenericGenerator;

/**
 * 由工具生成的java类,手工修改无效!
 * 
 * 
 */
@Entity
@Table(name = "UserToOSSAudioVo")
public class UserToOSSAudioVo implements Cloneable, Serializable {
	// /////////////////////////////////////////////////////////////////////////////
	// --->字段定义:
	// /////////////////////////////////////////////////////////////////////////////

	/**
	 * 最近一次上传音频的时间
	 */
	private Long createDate =(long) 0;

	/**
	 * id主键
	 */
	@Id
	@GenericGenerator(name = "generator", strategy = "identity")
	@GeneratedValue(generator = "generator", strategy = GenerationType.IDENTITY)
	private int id;
	/**
	 * 用户id
	 */
	private int uid;
	/**
	 * 最后一次上传音频的大小
	 */
	private int lastSize = 0;

	/**
	 * 最后一次上传音频的文件名
	 */
	private String lastFileName = "";

	/**
	 * 最后一次上传音频的结果
	 */
	private int result = 0;

	/**
	 * 记录状态,0表示正常,-0x10表示已删除
	 */
	private int sysflag = 0;

	// /////////////////////////////////////////////////////////////////////////////
	// --->getter and setter:
	// /////////////////////////////////////////////////////////////////////////////

	public Long getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Long createDate) {
		this.createDate = createDate;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getUid() {
		return uid;
	}

	public void setUid(int uid) {
		this.uid = uid;
	}

	public int getLastSize() {
		return lastSize;
	}

	public void setLastSize(int lastSize) {
		this.lastSize = lastSize;
	}

	public String getLastFileName() {
		return lastFileName;
	}

	public void setLastFileName(String lastFileName) {
		this.lastFileName = lastFileName;
	}

	public int getResult() {
		return result;
	}

	public void setResult(int result) {
		this.result = result;
	}

	public int getSysflag() {
		return sysflag;
	}

	public void setSysflag(int sysflag) {
		this.sysflag = sysflag;
	}
	// /////////////////////////////////////////////////////////////////////////////
	// --->流读写方法和打印方法:
	// /////////////////////////////////////////////////////////////////////////////
	@Override
	public String toString() {
		final StringBuilder sb = new StringBuilder();
		final String info;
		sb.append(",createDate=" + this.createDate);
		sb.append(",id=" + this.id);
		sb.append(",uid=" + this.uid);
		sb.append(",lastSize=" + this.lastSize);
		sb.append(",lastFileName=" + this.lastFileName);
		sb.append(",result=" + this.result);
		sb.append(",sysflag=" + this.sysflag);
		info = sb.toString();
		return info;
	}

	// /////////////////////////////////////////////////////////////////////////////
	// --->clone and copy:
	// /////////////////////////////////////////////////////////////////////////////
	@Override
	public Object clone() throws CloneNotSupportedException {
		return (UserToOSSAudioVo) super.clone();
	}

	/**
	 * 令当前对象(this)成为指定对象(src)的拷贝
	 * 对简单数据类型的数组,进行深层复制
	 * 对dataMap数据,进行dataMap的整体复制
	 * @param src
	 */
	public void copyOf(UserToOSSAudioVo src){
		this.createDate = src.createDate;
		this.id = src.id;
		this.uid = src.uid;
		this.lastSize = src.lastSize;
		this.lastFileName = src.lastFileName;
		this.sysflag = src.sysflag;
		this.result = src.result;
	}

}
